<?php
@ob_start();
@session_start();

error_reporting (E_ALL ^ E_NOTICE);
require_once("../../includes/GPSFunction.php");

$url = explode("/",dirname($_SERVER['PHP_SELF']));
$fold = $url[count($url)-1];

//	DB Connection
require("../../includes/config.inc.php"); 
require("../../includes/Database.class.php"); 

$db = new Database(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE); 
$db->connect(); 

$getUserInfo = "SELECT * FROM tb_clientinfo where ci_clientId = 0";
$resUserInfo = $db->query($getUserInfo);

if($db->affected_rows > 0){
	while($recordUserInfo = $db->fetch_array($resUserInfo))
	{
	
		$clientName = strtolower(str_replace(" ","",$recordUserInfo[ci_clientName]));
		if($clientName == $fold)
		{
			$clientOrgName = $recordUserInfo[ci_clientName];
			$clientLogo = $recordUserInfo[ci_clientLogo];
			$clientContent = $recordUserInfo[ci_aboutUs];
			$clientAddress = $recordUserInfo[ci_address];
			$clientFooter = $recordUserInfo[ci_footerText];
		}
	}

}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $clientOrgName;?> :: GPS Application</title>
<link href="../../images/fav-icon.gif" rel="icon" />
<link href="../../css/style.css" rel="stylesheet" type="text/css" />
<link href="../../css/content.css" rel="stylesheet" type="text/css" />
<link media="screen" rel="stylesheet" href="../../css/colorbox.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="../../js/ajax.js"></script>
<script type="text/javascript" src="../../js/loginValid.js"></script>
<script type="text/javascript" src="../../js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="../../js/jquery.colorbox.js"></script>
<script type="text/javascript" src="../../js/contentglider.js"></script>
<script type="text/javascript">

$(document).ready(function(){
	
  //hide toolbar and make visible the 'show' button
	$("span.downarr a").click(function() {
    $("#toolbar").slideToggle("fast");
    $("#toolbarbut").fadeIn("slow");    
  });
  
  //show toolbar and hide the 'show' button
  $("span.showbar a").click(function() {
    $("#toolbar").slideToggle("fast");
    $("#toolbarbut").fadeOut();    
  });
  
  //show tooltip when the mouse is moved over a list element 
  $("ul#social li").hover(function() {
		$(this).find("div").fadeIn("fast").show(); //add 'show()'' for IE
    $(this).mouseleave(function () { //hide tooltip when the mouse moves off of the element
        $(this).find("div").hide();
    });
  });
  
  //don't jump to #id link anchor 
  $(".facebook, .twitter, .delicious, .digg, .rss, .stumble, .menutit, span.downarr a, span.showbar a").click(function() {
   return false;                                         
	});
	
  //show quick menu on click 
	$("span.menu_title a").click(function() {
		if($(".quickmenu").is(':hidden')){ //if quick menu isn't visible 
			$(".quickmenu").fadeIn("fast"); //show menu on click
		}
		else if ($(".quickmenu").is(':visible')) { //if quick menu is visible 
      $(".quickmenu").fadeOut("fast"); //hide menu on click
    }
	});
	
	//hide menu on casual click on the page
	$(document).click(function() {
			$(".quickmenu").fadeOut("fast");
			$(".quickmenu").css({'vivibility': 'hidden'});
	});
	$('.quickmenu').click(function(event) { 
		event.stopPropagation(); //use .stopPropagation() method to avoid the closing of quick menu panel clicking on its elements 
	});

		
});
	featuredcontentglider.init({
	gliderid: "content_slide", //ID of main glider container
	contentclass: "glidecontent", //Shared CSS class name of each glider content
	togglerid: "p-select", //ID of toggler container
	remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable
	selected: 0, //Default selected content index (0=1st)
	persiststate: false, //Remember last content shown within browser session (true/false)?
	speed: 500, //Glide animation duration (in milliseconds)
	direction: "slider", //set direction of glide: "updown", "downup", "leftright", or "rightleft"
	autorotate: false, //Auto rotate contents (true/false)?
	autorotateconfig: [3000, 2] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
})
</script>
</head>
<body>



<div class="wrapper"><!-- wrapper div START here -->
	<div class="headerarea"><!-- Headerarea div START here -->
    	<div class="toparea"><!-- toparea div start here -->
        	<!--<p><a href="index.html">ABOUT GPS</a><a href="about.php">ABOUT US  </a><a href="contact.php">CONTACT US</a>&nbsp;</p>-->
        </div><!-- toparea div END here -->
        <div class="logo_login_area"><!-- Logo and Login div start here -->
        	<div class="logo_place"><img src="<?php echo CLIENTLOGOPATH.$clientLogo;?>" width="125" height="45" /></div>
            <div class="login_area">
            <form name="frmLogin" id="frmLogin" method="post" action="" autocomplete="off">
            	<div class="login_user">
                	<label>Username :</label>
                	<input type="text" name="txtUsername" id="txtUsername" class="login_input" onKeyPress="return submainLog(this,event)" /> 
                </div>
            	<div class="login_pass">
                	<label>Password :</label>
                	<input type="password" name="txtPassword" id="txtPassword" class="login_input" onKeyPress="return submainLog(this,event)" />
                </div>
                <div class="login_btn_div">
                	<input type="button" name="cmdLogin" id="cmdLogin" value="Login" class="login_btn" onclick="validateLogin(this);" />
                    
                </div>
            </form>
            </div>
        </div><!-- Logo and Login div start here -->
        
        
    </div><!-- headerarea div END here -->
	<div class="pagearea"><!-- pagearea div start here -->
    	<div align="center" style="width:100%; text-align:center" class="menuarea glidecontenttoggler" id="p-select">
        	<ul class="menu">
            	<li><a href="#">Home</a></li>
				<li><a href="index.html">ABOUT GPS</a></li>
                <li><a href="about.php" >ABOUT US  </a></li>
                <li><a href="contact.php">CONTACT US</a></li>
            </ul>
        
        </div>
        <div id="content_slide" class="glidecontentwrapper" align="center"> 

                <div class="glidecontent" >
                <img src="../../images/gps_image.gif" align="middle" width="100%" />
                </div>
                
                <div class="glidecontent">               	
                    <p>
                    <strong><?php echo strtoupper($clientOrgName);?></strong>
                    <?php echo $clientContent;?>
                    </p>                
                </div> 
                
                <div class="glidecontent">
                	<div class="contact_area">
		               	<?php echo $clientAddress;?>
                     </div>
                </div>
       </div>
        	
        
    </div><!-- Pagearea div end here -->
    <div class="clear"></div>
    <div class="footerarea"><!-- footerarea div START here -->
    	<span class="left"><!--© Copyright 2011, www.Pinwheel Trackers.com, All Right Reserved --></span>
        <span class="right"><?php echo $clientFooter;?></span>
    </div><!-- Footerarea div END here -->
</div><!-- wrapper div END here -->


</body>
</html>